Skip to content

fix(ci): advance action tags on push instead of pull_request_target - #366

Closed
Piotr1215 wants to merge 1 commit into
mainfrom
devops-1803/advance-tags-on-push
Closed

Piotr1215 wants to merge 1 commit into
mainfrom
devops-1803/advance-tags-on-push

Conversation

@Piotr1215

Copy link
Copy Markdown
Contributor

Summary

Advance action tags still triggers on pull_request_target closed. GitHub blocks that event by default in public repositories from 2 December 2026, with brownouts on 9 and 16 November, 16:00 to 18:00 UTC (changelog). The workflow merged after the DEVOPS-1803 inventory, so the open migration PRs do not cover it. Without this change, tag advancement stops at the cutoff and during each brownout.

  • The workflow runs on push to main, checks out github.sha, and declares no dangerous trigger.
  • The script resolves the merged PR whose merge_commit_sha is the pushed head on main, reads it from pulls/{n}, and passes the existing logic the same pull_request shape. The major-release, binary action, file count, ancestry and lease checks are unchanged.
  • A push that is not a PR merge logs a warning naming the manual remedy and exits green. Several matching PRs or malformed API data fail closed without moving a tag. The commit-to-PR lookup retries 3 times, 5 seconds apart.
  • The failure comment takes the PR number from the job output, so it still lands on the merged PR.

Test plan

  • make test-advance-action-tags: 14 tests. The 8 existing tests are unchanged. 6 new ones cover a push resolving a PR, the major-release label read from the API, a push with no PR (retried three times), PRs that only contain the commit or target another base, several matching PRs, and malformed API data.
  • Mutation checks: dropping the base filter, the single-match check or the retry each fails a test.
  • actionlint, shellcheck, make check-bats-jobs and zizmor on the changed workflow are clean. Repository-wide make lint still reports the existing dangerous-triggers finding on issue_comment in .github/workflows/claude.yml:4, which origin/main reproduces.
  • Live proof: the first merge to main after this one runs the new trigger. Check that run for Advanced <tag> or the no-change message.

Refs DEVOPS-1803

https://claude.ai/code/session_017edg9i7XSWRkNCSfeYYZzw

GitHub blocks pull_request_target by default in public repositories from
2 December 2026, with brownouts on 9 and 16 November. Advance action tags
(dca6bd4) landed after the DEVOPS-1803 inventory and still listened for
pull_request_target closed, so tag advancement would stop on the cutoff and
during each brownout, and fixes merged to main would silently stay unshipped.

The workflow now runs on push to main. The script resolves the merged pull
request whose merge commit is the pushed head through the API and feeds the
existing logic the same pull_request shape, so the major-release, binary
action, file count and lease checks are unchanged. A push that is not a PR
merge warns and skips; several matching PRs or malformed API data fail closed.

Refs: DEVOPS-1803

Claude-Session: https://claude.ai/code/session_017edg9i7XSWRkNCSfeYYZzw
@Piotr1215
Piotr1215 requested a review from a team as a code owner November 9, 2026 09:07
@Piotr1215

Copy link
Copy Markdown
Contributor Author

Closing in favour of #369, which does the same with a stricter fail-loud PR lookup and more tests. DEVOPS-1803 now merges #369 before #349.

@Piotr1215 Piotr1215 closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant